﻿@using System.Web.Optimization
@using Ed.Entity
@using Ed.Web.Helpers
@model Ed.Entity.TPregnanterServiceRecord
@{
    Layout = null;
    //月嫂id
    var pid = (int)ViewBag.Pid;
    //创建人Id,UserLname,UserTname
    var yuesaoCreaterId = (int)ViewBag.SysUser.Id;
    var yuesaoCreaterName = (string)ViewBag.SysUser.UserTname; 
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>雪绒花_月嫂信息服务记录</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" conte="conte" nt="IE=Edge" />
    @Styles.Render("~/Themes/default/css/cp.globle.min1.css")
    @Scripts.Render("~/Themes/default/js/cp.globle.min1.js")
    <script type="text/javascript">
        //=============================================================
        //去除顶层加载中
        $(document).ready(function () {
            //去除加载中
            if (undefined != top.dialog.list["show_loading"]) {
                top.dialog.list["show_loading"].close().remove();
                //showTopMsg("页面加载成功！", "温馨提示", "Success");
            }
        });
        //=====================================================================
    </script>
    <!--my97DatePicker-->
    <script src="/Themes/default/lib/my97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <!--省市数据-->
    <script src="/Themes/default/base/js/city.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            validate_form();
        });
        //表单验证
        function validate_form() {
            //表单验证
            $("#pregnanterservicerecord_form").validate({
                invalidHandler: function (e, validator) {
                    var msg = "有 " + validator.numberOfInvalids() + " 项填写有误，请检查！";
                    $("#msgprint").html(msg).show().focus();
                    setTimeout(function () {
                        $("#msgprint").fadeOut(500);
                        //如果动画结束则删除节点
                        if (!$("#msgprint").is(":animated")) {
                            $("#msgprint").hide();
                        }
                    }, 1000);
                },
                focusInvalid: false,
                errorPlacement: function (error, element) {
                    var errorMsg = error[0].innerHTML;
                    var elementName = element[0].name;
                    $("#" + elementName).formtip(errorMsg);
                    $("#" + elementName).attr("placeholder", errorMsg);
                },
                success: function (element) {
                    var elem = $(element)[0].htmlFor;
                    $("#" + elem).poshytip('disable');
                    $("#" + elem).poshytip('destroy');
                    $("#" + elem).removeClass("error").addClass("success");
                }
            });
        }
        //表单验证方法，供父窗口调用
        function form_valid() {
            if ($("#pregnanterservicerecord_form").valid()) {
                return true;
            } else {
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="pregnanterservicerecord_form" name="pregnanterservicerecord_form">
    <!--月嫂id-->
    @Html.Hidden("PInfoCode", @pid)
    <!--服务id-->
    @Html.HiddenFor(model => model.Id)
    <!--服务号-->
    @Html.HiddenFor(model => model.PServiceCode)
    <!--表单错误提示区-->
    <div tabindex="-1" id="msgprint" class="warning" style="position: fixed; width: 90%;
        display: none;">
        您的表单包含错误，请检查！</div>
    <div class="tab-content">
        <ul class="nav nav-tabs" id="formTab">
            <li class="active"><a href="#tab-info" data-toggle="tab">月嫂服务日程信息管理</a></li>
        </ul>
        <div class="tab-pane active" id="tab-info">
            <div style="height: 15px;">
            </div>
            <table width="570" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
                <tbody>
                    <tr>
                        <th>
                            <span class="must">*</span>服务类型：
                        </th>
                        <td colspan="3">
                            <label class="radio-inline">
                                @Html.RadioButtonFor(model => model.PServiceType, 1)上岗（内单）
                            </label>
                            <label class="radio-inline">
                                @Html.RadioButtonFor(model => model.PServiceType, 2)上户（外单）
                            </label>
                            <label class="radio-inline">
                                @Html.RadioButtonFor(model => model.PServiceType, 3)请假休息
                            </label>
                            <label class="radio-inline">
                                @Html.RadioButtonFor(model => model.PServiceType, 4)其他安排
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span class="must">*</span>服务开始：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.PServiceBegin, new { @class = "form-control Wdate required dateISO", Value = @Html.LoadDefaultValue((Html.DateTimeNullPalse(Model.PServiceBegin)).ToString("yyyy-MM-dd"), DateTime.Now.ToString("yyyy-MM-dd")), onclick = "WdatePicker()", @minlength = "10", @maxlength = "10", @style = "width: 200px; ", @placeholder = "字段提示" })
                        </td>
                        <th>
                            <span class="must">*</span>服务结束：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.PServiceEnd, new { @class = "form-control Wdate required dateISO", @style = "width: 200px; ", Value = @Html.LoadDefaultValue((Html.DateTimeNullPalse(Model.PServiceBegin)).ToString("yyyy-MM-dd"), ""), onclick = "WdatePicker()", @placeholder = "" })
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span class="must">*</span>服务备注：
                        </th>
                        <td colspan="3">
                            @Html.TextAreaFor(model => model.PServiceNote, new { @class = "form-control required Note", @style = "width:500px; height:50px;", @placeholder = "备注信息" })
                        </td>
                    </tr>
                    <tr>
                        <th>
                            添加时间：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.PServiceCreateTime, new { @class = "form-control isreadonly", Value = @Html.LoadDefaultValue(@Html.DateTimeNullPalse(Model.PServiceCreateTime).ToString("yyyy-MM-dd"), DateTime.Now.ToString("yyyy-MM-dd")), @onfocus = "this.blur()" })
                        </td>
                        <th>
                            添加人：
                        </th>
                        <td>
                            @Html.DropDownListFor(model => model.PServiceCreater, @Html.BuildSelectList(@yuesaoCreaterId.ToString() + "|" + @yuesaoCreaterName, @Html.LoadDefaultValue(Model.PServiceCreater.ToString(), @yuesaoCreaterId.ToString()).ToString(), false), new { @class = "form-control", @style = "width:200px;", @disabled = "diabled" })
                            @Html.HiddenFor(model => model.PServiceCreater, new { Value = @Session[EdKeys.SESSION_USER_ID], @class = "form-control" })
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    </form>
</body>
